package com.yin.project.admin.rbac.model;

import com.yin.project.admin.framework.DataEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by Eason on 2017/2/23.
 */
@Entity
@Table(name = "LoginLog")
public class LoginLogEntity extends DataEntity{

    @Column(name = "ClientIp")
    private String clientIp;//客户端登录IP

    @Column(name = "LoginTime")
    private Date loginTime;//登录时间

    @Column(name="Browser")
    private String browser;//登录使用的浏览器

    @Column(name = "EmployeeId")
    private String employeeId;//员工Id

    @Column(name = "UserName")
    private String userName;//员工姓名

    @Column(name = "EmployeeCode")
    private String employeeCode;//员工编号

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getEmployeeCode() {
        return employeeCode;
    }

    public void setEmployeeCode(String employeeCode) {
        this.employeeCode = employeeCode;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
